﻿@model VoiceAd.Models.tblBroadCast
@{
    ViewBag.Title = "Thêm mới khung giờ phát sóng";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $("#ProvinceId").change(function () {
            var url = '@Url.Content("~/")' + "admincp/Station_SelectedState";
            var ddlsource = "#ProvinceId";
            var ddltarget = "#StationId";
            $.getJSON(url, { id: $(ddlsource).val() }, function (data) {
                $(ddltarget).empty();
                $.each(data, function (index, optionData) {
                    $(ddltarget).append("<option value='" + optionData.Value + "'>" + optionData.Text + "</option>");
                });
            });
        });
    });
</script>
<h2>
    Thêm mới khung giờ phát sóng</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Thông tin</legend>
        <div class="editor-label">
            Tỉnh/Thành
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProvinceId", (SelectList)ViewBag.lstProvince, new { style = "width: 150px" })
        </div>
        <div class="editor-label">
            Nhà đài
        </div>
        <div class="editor-field">
            @Html.DropDownList("StationId", (SelectList)ViewBag.lstStation, new { style = "width: 150px" })
            @Html.ValidationMessageFor(model => model.StationId)
        </div>
        <div class="editor-label">
            Thời gian phát sóng
        </div>
        <div class="editor-field">
            @Html.DropDownList("SectionId", (SelectList)ViewBag.lstSection, new { style = "width: 150px" })
            @Html.ValidationMessageFor(model => model.SectionId)
        </div>
        <div class="editor-label">
            Khung giờ phát sóng
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BroadCastTime)
            @Html.ValidationMessageFor(model => model.BroadCastTime)
        </div>
        <div class="editor-label">
            Đơn giá
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>
        <p>
            <input type="submit" value="Thêm mới" />
        </p>
    </fieldset>
}
<div>
    <a href="@Url.Content("~/broadCast-1.html")">Quản lý khung giờ phát sóng</a>
</div>
